home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / longfile / longfile.bas < prev    next >
Encoding:
BASIC Source File  |  1996-08-12  |  1.4 KB  |  55 lines

  1. ' copyright 1996, Internet Software Engineering
  2. Option Explicit
  3.  
  4. Global gShortFilename As String
  5. Global gLongFilename As String
  6. Global gIn16BitSystem As Integer    ' True or False
  7.  
  8. ' structure for dialog box setup
  9. Type LongFile
  10.    Action As Integer                ' 1 = open, 2 = save
  11.    Color As Long                    ' background color
  12.    DialogTitle As String            ' title bar text
  13.    Filename As String               ' filename for input to dialog box, output filename will be in gShortFilename and gLongFilename
  14.    Filter As String                 ' file extension filter
  15.    FilterIndex As Integer           ' index into file extension filter
  16. End Type
  17.  
  18. Global LF As LongFile
  19.  
  20. ' necessary structures for api calls
  21. Type FILETIME
  22.    dwLowDateTime As Long
  23.    dwHighDateTime As Long
  24. End Type
  25.  
  26. Const MAX_PATH = 260
  27.  
  28. Type WIN32_FIND_DATA
  29.    dwFileAttributes As Long
  30.    ftCreationTime As FILETIME
  31.    ftLastAccessTime As FILETIME
  32.    ftLastWriteTime As FILETIME
  33.    nFileSizeHigh As Long
  34.    nFileSizeLow As Long
  35.    dwReserved0 As Long
  36.    dwReserved1 As Long
  37.    cFileName As String * MAX_PATH
  38.    cAlternate As String * 14
  39. End Type
  40.  
  41. ' copyright 1996, Internet Software Engineering
  42. Sub GetLongFilename ()
  43.  
  44.    ' check that action member of LongFile structure is set
  45.    If LF.Action = 0 Then
  46.       MsgBox "Illegal function call.", 16, App.Title
  47.       Exit Sub
  48.    End If
  49.  
  50.    Load frmLongFile
  51.    frmLongFile.Show 1
  52.  
  53. End Sub
  54.  
  55.